home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Toolbox
/
Visual Basic Toolbox (P.I.E.)(1996).ISO
/
screen
/
scrtst
/
frmutil.frm
< prev
next >
Wrap
Text File
|
1995-01-24
|
4KB
|
154 lines
VERSION 2.00
Begin Form frmUtility
ClientHeight = 480
ClientLeft = 2415
ClientTop = 7650
ClientWidth = 1245
ControlBox = 0 'False
Height = 1170
Left = 2355
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 480
ScaleWidth = 1245
Top = 7020
Width = 1365
Begin PictureBox picCapture
AutoRedraw = -1 'True
Height = 495
Left = 480
ScaleHeight = 465
ScaleWidth = 465
TabIndex = 0
Top = 0
Width = 495
End
Begin CommonDialog dlgUtility
Left = 0
Top = 0
End
Begin Menu mnuPopup
Caption = "PopUp"
Begin Menu mnuPType
Caption = "&1 VGA 640x480"
Index = 0
End
Begin Menu mnuPType
Caption = "&2 Super VGA 800x600"
Index = 1
End
Begin Menu mnuPType
Caption = "&3 1024x768"
Index = 2
End
Begin Menu mnuPSep1
Caption = "-"
End
Begin Menu mnuPColors
Caption = "&Background Color..."
End
Begin Menu mnuPSep2
Caption = "-"
End
Begin Menu mnuPGrab
Caption = "&Grab Screen"
End
Begin Menu mnuPDest
Caption = "Capture &Destination"
Begin Menu mnuPDDestOpt
Caption = "&Clipboard"
Checked = -1 'True
Index = 0
End
Begin Menu mnuPDDestOpt
Caption = "BMP &File"
Index = 1
End
End
Begin Menu mnuPSep3
Caption = "-"
End
Begin Menu mnuPSendBack
Caption = "&Send to Back"
End
Begin Menu mnuPMinimize
Caption = "Mi&nimize"
End
Begin Menu mnuPSep4
Caption = "-"
End
Begin Menu mnuPAbout
Caption = "&About Screen Tester..."
End
Begin Menu mnuPClose
Caption = "&Close"
End
End
End
Option Explicit
'
' This form is used to hold the popup menu and
' common dialog control. It should never be shown
'
Sub Form_Load ()
'
' Since VB doesn't allow an Alt+F4 menu accelerator hotkey,
' it's faked by using a Tab character and code in frmMain's
' KeyDown event.
'
mnuPClose.Caption = mnuPClose.Caption & Chr$(8) & "Alt+F4"
SetUpForm Me, "Utility"
End Sub
Sub mnuPAbout_Click ()
frmAbout.Show MODAL
End Sub
Sub mnuPClose_Click ()
ExitProgram
End Sub
Sub mnuPColors_Click ()
'
' Invoke Common Colors Dialog and set main form's background color
'
Const CC_RGBINIT = &H1&
dlgUtility.Flags = CC_RGBINIT
dlgUtility.Color = frmMain.BackColor
dlgUtility.Action = 3
frmMain.BackColor = dlgUtility.Color
SaveColor (dlgUtility.Color)
End Sub
Sub mnuPDDestOpt_Click (Index As Integer)
SetDestCheck Index
End Sub
Sub mnuPGrab_Click ()
'
' Capture simulated screen area
'
SendFormToBack frmMain
DoEvents
GrabScreen
End Sub
Sub mnuPMinimize_Click ()
'
' Minimize application
'
SaveScreenPosition
frmMain.WindowState = MINIMIZED
End Sub
Sub mnuPSendBack_Click ()
SendFormToBack frmMain
End Sub
Sub mnuPType_Click (Index As Integer)
SetStyle frmMain, Index
End Sub